<?php 
/* P3(c)

******************************************************************************
                                                                                      
                         __                                                        
                        /__)                                                       
                       /__        P3 - moving Technologie            
                        __)                                                          
                        __)                                                          
                                                                                        
                                                                                        
       Copyright 2009 by p3.co.at                                                                                 
                                                                                        
       visit www.p3.co.at to get more Informations 
       about Teriko - Betriebsdatenerfassung                                                                                 
       - it's not allowed to change this scripts
       - it's not allowed to remove this copyright-tag

       -- you can download the complete license   
          under http://www.teriko.org

 (c) by Patrik Pfaffenbauer and P3 (http://www.p3.co.at)

 | Programname: P3.Teriko
 | Authtor: P3.Verein
 | Coder: Patrik Pfaffenbauer
 | Version: 0.1

 | Change Index
 |_____________________________________________
 |                                             |
 |4.3.2010 Erstellung | Patrik Pfaffenbauer    |
 |_____________________________________________|

******************************************************************************

P3(c) */

class ReportSystem extends Base
{
	
	function ReportSystem()
	{
		$this->title = $GLOBALS['lang']->GetLanguage("ReportSystem", "title");
		$this->toolbar = true;
		$this->moduleID = 700;
		$this->permission = GetPermission($this->moduleID);
		$this->toolbarClass = "icon-48-component";
		
		if(PermissionCount($this->permission) == 0)
		{
			$this->allowed = false;
		}
	}
	
	function AnalysPost()
	{
		$this->Paint();
	}
	public function Paint()
	{
		echo '
		<a href="report/php/WeeklyWorkTime.php" class="modal" rel="{handler:\'iframe\',size:{x:840,y:550}}">WeeklyWorkTime</a><br/>
		<a href="report/php/JobTimesWeek.php" class="modal" rel="{handler:\'iframe\',size:{x:840,y:550}}">JobTimesWeek</a><br/>
		<a href="report/php/JobTimesMonth.php" class="modal" rel="{handler:\'iframe\',size:{x:840,y:550}}">JobTimesMonth</a>
		';
	}
	
	public function Toolbar()
	{
		if(!$this->allowed)
		{
			return;
		}
		
		PaintDefaultToolbar($this);
	}

	public function AddCSS()
	{
		echo '<link rel="stylesheet" type="text/css" href="css/SqueezeBox/squeeze.css" /> ';
	}
	public function AddJS()
	{
		echo '<script type="text/javascript">
		
		window.addEvent(\'domready\', function() {

			SqueezeBox.initialize({});
			SqueezeBox.assign($$(\'a.modal\'), {
				parse: \'rel\'
			});
		});
		
		</script>';
	}
}
?>